package com.test.nnooolwdeaer.bean_wooden.star_dialog;

import com.test.nnooolwdeaer.util_wooden.StringUtil_wooden;
import com.google.gson.Gson;

import org.json.JSONObject;

public class NormalWindowConfig_wooden {

    private static NormalWindowConfig_wooden instance;

    private NormalWindowConfig_wooden(){}

    public static NormalWindowConfig_wooden getInstance_wooden(){
        if (instance==null) instance = new NormalWindowConfig_wooden();
        return instance;
    }

    public static void parseData(JSONObject jsonObject){
        instance = new Gson().fromJson(jsonObject.toString(), NormalWindowConfig_wooden.class);
        instance.switch1 = jsonObject.optString("switch");
    }

    private int num;
    private String content;
    private String switch1;

    public int getNum_wooden() {
        return num;
    }

    public String getContent_wooden() {
        return StringUtil_wooden.getSafeString_wooden(content);
    }

    public boolean isSwitch_wooden(){
        return StringUtil_wooden.getSafeString_wooden(switch1).equalsIgnoreCase("YES");
    }

}
